Vue.filter('isShow',function (isShow) {
    return isShow?"隐藏":"显示"
})

var vm = new Vue({
    el: '#app',
    data: {
        cardList:[
            {
                cardName:'',
                isShow:true,
                itemList:[
                    {
                        name:'',
                        url:''
                    }
                ]
            }
        ]
    },
    mounted: function () {
        this.$nextTick(function () {
            this.getCardData();
        })
    },
    methods:{
        getCardData:function () {
            var url ="data/card.json";
            axios.get(url).
                then(function (response) {
                    vm.cardList = response.data.cardList;
                })
                .catch(function (error) {
                    console.log(error);
                });
        },
        changeOperation:function (card) {
            card.isShow=!card.isShow;
        },
        goUrl:function (url) {
            window.open(url);
        }
    }
})